package com.acme.javaschool.intense.sems.sem2concurrency.pool;

public class TestHelper {
    public volatile int successCount = 0;
    public volatile int failureCount = 0;
    public volatile int totalWork = 0;

    public TestHelper() {
    }

    public synchronized void submitWork(int num) {
        totalWork += num;
    }

    public synchronized void recordSuccess() {
        successCount++;
    }

    public synchronized void recordFailure() {
        failureCount++;
    }

    public synchronized int getTotalWork() {
        return totalWork;
    }

    public int getSuccessCount() {
        return successCount;
    }

    public int getFailureCount() {
        return failureCount;
    }
}